org.eclipse.vtp.framework.common.configurations
Class VariableMappingConfiguration

java.lang.Object
  extended by org.eclipse.vtp.framework.common.configurations.VariableMappingConfiguration
All Implemented Interfaces:
CommonConstants, IConfiguration

public class VariableMappingConfiguration
extends java.lang.Object
implements IConfiguration, CommonConstants

A configuration describing how to map a variable into a target process.

Author:
Lonnie Pryor

Field Summary
static int TYPE_EXPRESSION
          Initialize variable with an expression.
static int TYPE_NONE
          Do not initialize the variable.
static int TYPE_STATIC
          Initialize variable to a static value.
static int TYPE_VARIABLE
          Initialize variable with an expression.
 
Fields inherited from interface org.eclipse.vtp.framework.common.configurations.CommonConstants
MAPPING_TYPE_EXPRESSION, MAPPING_TYPE_NONE, MAPPING_TYPE_STATIC, MAPPING_TYPE_VARIABLE, NAME_ASSIGNMENT, NAME_BRANCH, NAME_BRAND, NAME_DATA_TYPE, NAME_DISPATCH, NAME_ENTRY, NAME_EXIT, NAME_FIELD, NAME_INITIAL_VALUE, NAME_KEY, NAME_LEFT_OPERAND, NAME_NAME, NAME_OUTGOING, NAME_PATH, NAME_PRIMARY_FIELD, NAME_RIGHT_OPERAND, NAME_SCRIPT, NAME_SCRIPTING_LANGUGAGE, NAME_TYPE, NAME_URI, NAME_VALUE, NAME_VARIABLE_MAPPING, NAMESPACE_URI
 
Constructor Summary
VariableMappingConfiguration()
          Creates a new VariableMapping.
 
Method Summary
 java.lang.String getScriptingLangugage()
          Returns the scripting language to use if the value is an expression.
 int getType()
          Returns the type of mapping to perform.
 java.lang.String getValue()
          Returns the value to use for the mapping.
 void load(org.w3c.dom.Element configurationElement)
          Loads the configuration information from the specified XML element.
 void save(org.w3c.dom.Element configurationElement)
          Saves the configuration information into the supplied XML element.
 void setExpressionValue(java.lang.String expression, java.lang.String scriptingLangugage)
          Configures this mapping to have the result of an expression set as the value.
 void setNoValue()
          Configures this mapping to have no value set.
 void setStaticValue(java.lang.String value)
          Configures this mapping to have a static value set.
 void setVariableValue(java.lang.String variableName)
          Configures this mapping to have a variable set as the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_NONE

public static final int TYPE_NONE
Do not initialize the variable.

See Also:
Constant Field Values

TYPE_STATIC

public static final int TYPE_STATIC
Initialize variable to a static value.

See Also:
Constant Field Values

TYPE_EXPRESSION

public static final int TYPE_EXPRESSION
Initialize variable with an expression.

See Also:
Constant Field Values

TYPE_VARIABLE

public static final int TYPE_VARIABLE
Initialize variable with an expression.

See Also:
Constant Field Values
Constructor Detail

VariableMappingConfiguration

public VariableMappingConfiguration()
Creates a new VariableMapping.

Method Detail

getType

public int getType()
Returns the type of mapping to perform.

Returns:
The type of mapping to perform.

getValue

public java.lang.String getValue()
Returns the value to use for the mapping.

Returns:
The value to use for the mapping.

getScriptingLangugage

public java.lang.String getScriptingLangugage()
Returns the scripting language to use if the value is an expression.

Returns:
The scripting language to use if the value is an expression.

setNoValue

public void setNoValue()
Configures this mapping to have no value set.


setStaticValue

public void setStaticValue(java.lang.String value)
Configures this mapping to have a static value set.

Parameters:
value - The value to set the variable to.

setExpressionValue

public void setExpressionValue(java.lang.String expression,
                               java.lang.String scriptingLangugage)
Configures this mapping to have the result of an expression set as the value.

Parameters:
expression - THe expression to evaluate.
scriptingLangugage - The language the expression is defined in.

setVariableValue

public void setVariableValue(java.lang.String variableName)
Configures this mapping to have a variable set as the value.

Parameters:
variableName - The name of the variable to use as the value.

load

public void load(org.w3c.dom.Element configurationElement)
Description copied from interface: IConfiguration
Loads the configuration information from the specified XML element.

Specified by:
load in interface IConfiguration
Parameters:
configurationElement - The element to load the configuration from.

save

public void save(org.w3c.dom.Element configurationElement)
Description copied from interface: IConfiguration
Saves the configuration information into the supplied XML element.

Specified by:
save in interface IConfiguration
Parameters:
configurationElement - The element to save the configuration to.